<template>
  <div class="mains">
    <p>{{ text }}</p>
    <button @click="openPop">弹窗</button>
  </div>
</template>

<script setup lang="ts">
import { showPop } from "@/componentsTs/pop.ts";
import { ref } from "vue";

const text = ref("11");
const openPop = () => {
  showPop({
    title: "11",
    content: "Hello1",
    color:'pink',
    onCancel: (close: any) => {
      text.value = "取消啊";
      close();
    },
    onConfirm: (close: any) => {
      (text.value = "确定啊"), close();
    },
  });
};
</script>

<style scoped lang="scss">
@import "./main.module.scss";
</style>
